package study.saas.order.facade.impl;


import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;
import study.saas.common.viewmodel.ApiResultV2;
import study.saas.common.viewmodel.PageModel;
import study.saas.order.entity.Commodity;
import study.saas.order.entity.Orders;
import study.saas.order.service.CommodityService;
import study.saas.order.service.OrdersFacade;
import study.saas.order.service.OrdersService;
import study.saas.order.service.model.CommodityFilterDTO;
import study.saas.order.service.model.OrdersMakeDTO;
import study.saas.order.service.model.OrdersSearchDTO;

import javax.annotation.Resource;

/**
 * @author zxx
 */
@Component("OrderFacade")
@Service(version = "1.0.0")
public class OrdersFacadeImpl implements OrdersFacade {

    @Resource
    private OrdersService ordersService;

    @Override
    public ApiResultV2 make(OrdersMakeDTO make) {
        return ordersService.make(make);
    }

    @Override
    public ApiResultV2 getByUserName(String userName) {

        return ordersService.getByUserName(userName);
    }

    @Override
    public ApiResultV2 getByCommodityName(String commodityName) {

        return ordersService.getByCommodityName(commodityName);
    }

    @Override
    public ApiResultV2 search(OrdersSearchDTO search) {

        return ordersService.search(search);
    }

}
